package com.zhaoxi.boot.demo.bootlesson1.config;

import com.zhaoxi.boot.demo.bootlesson1.service.BeanService;
import com.zhaoxi.boot.demo.bootlesson1.service.ImportBean;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Import;
import org.springframework.context.annotation.ImportResource;

/**
 * @author ZXM
 * @description TODO
 * @date 2024/3/4 0:46
 */
@Configuration
@ImportResource(value = "classpath:context/bean.xml")
@Import(ImportBean.class)
public class SpringConfig {
    @Bean//手动将返回值对象放入IOC容器进行管理
    public BeanService bean1(){
        return new BeanService();
    }
}
